<template>
  <div>
    <div class="home-header">
      <router-link :to="'/home?tab='+item.path" tab="li" v-for="(item, index) in nav" :key="index" class="aa">{{
        item.title
      }}</router-link>
    </div>
    <router-view :key="$route.fullPath"/>
  </div>
</template>


<script>
export default {
  data() {
    return {
      nav: [
        { title: "全部", id: 1, path: "all" },
        { title: "精华", id: 2, path: "good" },
        { title: "分享", id: 3, path: "share" },
        { title: "问答", id: 4, path: "ask" },
        { title: "招聘", id: 5, path: "job" },
        { title: "客户端测试", id: 6, path: "dev" },
      ],
    };
  },
  methods:{

  }
};
</script>


<style>
.home-header {
  width: 100%;
  height: 60px;
  line-height: 60px;
  display: flex;
  justify-content: start;
  background: gray;
}
.aa {
  margin-left: 20px;
}

img {
  width: 30px;
  height: 30px;
}


</style>